Builder

class Builder

Builder is responsible for setting options and defaults while creating new instance of Browser.

Constructors

Builder
Link copied to clipboard
fun Builder()

Functions

build
Link copied to clipboard
fun build(): Browser
Creates new instance of Browser with configuration passed to builder
incognito
Link copied to clipboard
fun incognito(enabled: Boolean): Browser.Builder
Enables incognito mode while creating new targets (default: true)Incognito mode uses pl.wendigo.chrome.api.browser.BrowserContextID to separate different targets from each other (separating cookies, caches, storages...
multiplexConnections
Link copied to clipboard
fun multiplexConnections(enabled: Boolean): Browser.Builder
Enables Manager to share single, underlying WebSocket connection to debugger with multiple sessions (default: true)
runInDocker
Link copied to clipboard
fun runInDocker(enabled: Boolean): Browser.Builder
Enabled creating headless Chrome instance when Browser is created (default: false)
withAddress
Link copied to clipboard
fun withAddress(address: String): Browser.Builder
Sets browser debugger address (default: localhost:9222)
withBlankPage
Link copied to clipboard
fun withBlankPage(address: String): Browser.Builder
Sets default blank page location (default: about:blank)
withDockerImage
Link copied to clipboard
fun withDockerImage(dockerImage: String): Browser.Builder
Sets docker image name that will be used to create headless Chrome instance (default: eu.gcr.
withEventsBufferSize
Link copied to clipboard
fun withEventsBufferSize(size: Int): Browser.Builder
Sets frames buffer size for underlying pl.wendigo.chrome.protocol.
withViewportHeight
Link copied to clipboard
fun withViewportHeight(height: Int): Browser.Builder
Sets default viewport height while creating sessions (default; 768, min: 100)
withViewportWidth
Link copied to clipboard
fun withViewportWidth(width: Int): Browser.Builder
Sets default viewport width while creating sessions (default: 1024, min: 100)

Sources

jvm source
Link copied to clipboard